cmake_minimum_required(VERSION 3.0)
project(extend_py)
set(PYTHON_DIR "C:/Users/Chen Chang/AppData/Local/Programs/Python/Python35")
set(PYTHON_INC ${PYTHON_DIR}/include)
set(PYTHON_LIB ${PYTHON_DIR}/libs/python35.lib)
add_executable(main main.cpp)
add_library(spam SHARED
    spammodule.cpp
)
add_dependencies(main spam)
target_include_directories(spam PUBLIC ${PYTHON_INC})
target_link_libraries(spam ${PYTHON_LIB})
set_target_properties(spam PROPERTIES
SUFFIX .pyd)
target_include_directories(main PUBLIC ${PYTHON_INC})
target_link_libraries(main ${PYTHON_LIB} spam)
